﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace EQual.MainModule.Documents.DocumentsDetailViews
{
    /// <summary>
    /// Interaction logic for DocumentVersionsView.xaml
    /// </summary>
    public partial class DocumentVersionsView : UserControl  
    {
        public DocumentVersionsView()
        {
            InitializeComponent();
        }

        private void datagrid_RowEditEnding(object sender, Microsoft.Windows.Controls.DataGridRowEditEndingEventArgs e)
        {
           // Presenter.AddNewAssociation(GetActiveItem());
        }

        public DataAccesLayer.Form GetActiveItem()
        {
            return this.datagrid.SelectedItem as DataAccesLayer .Form  ;
        }

        #region IDocumentFormsView Members

        public void SetModel(System.Collections.IEnumerable model)
        {
            this.datagrid.ItemsSource = model;
        }

        public object  Presenter { get; set; }

        #endregion




    }
}
